From: Yann Gautier Date: Wed, 14 Nov 2018 17:46:15 +0000 (+0100) Subject: stm32mp1: use MULTI_CONSOLE_API X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=cce37d44a9436f73ef8ceda294f290689151712b;p=project%2Fbcm63xx%2Fatf.git stm32mp1: use MULTI_CONSOLE_API Signed-off-by: Yann Gautier --- diff --git a/plat/st/stm32mp1/bl2_plat_setup.c b/plat/st/stm32mp1/bl2_plat_setup.c index 9f2d8bd0..d85ae96e 100644 --- a/plat/st/stm32mp1/bl2_plat_setup.c +++ b/plat/st/stm32mp1/bl2_plat_setup.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include @@ -16,11 +15,12 @@ #include #include #include +#include #include +#include #include #include #include -#include #include #include #include @@ -28,6 +28,8 @@ #include #include +static struct console_stm32 console; + void bl2_el3_early_platform_setup(u_register_t arg0, u_register_t arg1, u_register_t arg2, u_register_t arg3) { @@ -137,8 +139,8 @@ void bl2_el3_plat_arch_setup(void) clk_rate = stm32mp1_clk_get_rate((unsigned long)dt_dev_info.clock); - if (console_init(dt_dev_info.base, clk_rate, - STM32MP1_UART_BAUDRATE) == 0) { + if (console_stm32_register(dt_dev_info.base, clk_rate, + STM32MP1_UART_BAUDRATE, &console) == 0) { panic(); } diff --git a/plat/st/stm32mp1/platform.mk b/plat/st/stm32mp1/platform.mk index 678a8528..f4a0ca4a 100644 --- a/plat/st/stm32mp1/platform.mk +++ b/plat/st/stm32mp1/platform.mk @@ -8,6 +8,7 @@ ARM_CORTEX_A7 := yes ARM_WITH_NEON := yes BL2_AT_EL3 := 1 USE_COHERENT_MEM := 0 +MULTI_CONSOLE_API := 1 STM32_TF_VERSION ?= 0 diff --git a/plat/st/stm32mp1/sp_min/sp_min_setup.c b/plat/st/stm32mp1/sp_min/sp_min_setup.c index 56598c8b..bd4f2ec0 100644 --- a/plat/st/stm32mp1/sp_min/sp_min_setup.c +++ b/plat/st/stm32mp1/sp_min/sp_min_setup.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include @@ -17,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -30,6 +30,8 @@ ******************************************************************************/ static entry_point_info_t bl33_image_ep_info; +static struct console_stm32 console; + /******************************************************************************* * Interrupt handler for FIQ (secure IRQ) ******************************************************************************/ @@ -112,8 +114,9 @@ void sp_min_early_platform_setup2(u_register_t arg0, u_register_t arg1, result = dt_get_stdout_uart_info(&dt_dev_info); if ((result > 0) && dt_dev_info.status) { - if (console_init(dt_dev_info.base, 0, STM32MP1_UART_BAUDRATE) - == 0) { + if (console_stm32_register(dt_dev_info.base, 0, + STM32MP1_UART_BAUDRATE, &console) == + 0) { panic(); } } diff --git a/plat/st/stm32mp1/stm32mp1_helper.S b/plat/st/stm32mp1/stm32mp1_helper.S index b0ea0d8e..673706ee 100644 --- a/plat/st/stm32mp1/stm32mp1_helper.S +++ b/plat/st/stm32mp1/stm32mp1_helper.S @@ -149,7 +149,7 @@ func plat_crash_console_init ldr r0, =STM32MP1_DEBUG_USART_BASE ldr r1, =STM32MP1_HSI_CLK ldr r2, =STM32MP1_UART_BAUDRATE - b console_core_init + b console_stm32_core_init endfunc plat_crash_console_init /* --------------------------------------------- @@ -160,7 +160,7 @@ endfunc plat_crash_console_init */ func plat_crash_console_flush ldr r1, =STM32MP1_DEBUG_USART_BASE - b console_core_flush + b console_stm32_core_flush endfunc plat_crash_console_flush /* --------------------------------------------- @@ -176,5 +176,5 @@ endfunc plat_crash_console_flush */ func plat_crash_console_putc ldr r1, =STM32MP1_DEBUG_USART_BASE - b console_core_putc + b console_stm32_core_putc endfunc plat_crash_console_putc